import java.util.Scanner;
public class TaxCalcculator{
public static void main(String[]args){
Scanner in =new Scanner(System.in);
 final double RATE1 = 0.1 ;
final double  RATE2 = 0.25;
final double  RATE_SINGLE_LIMIT = 32000 ;
final double  RATE_MDRRIED_LIMIT = 64000;
 double tax1=0, tax2=0;
 System.out.println("please enter your income");
 double income = in.nextDouble();
 System.out.println("s for single m for married ");
 String marriedStatus=in.next();
 if (marriedStatus.equals("s"))
 {
   if (income <= RATE_SINGLE_LIMIT)
      {
	  tax1=income*RATE1;
	  }
   else
   {
    tax1=RATE1*RATE_SINGLE_LIMIT;
    tax2=RATE2*(income - RATE_SINGLE_LIMIT);
   }
 }
 else 
  {
    if(income <= RATE_MDRRIED_LIMIT)
	{
	  tax1=RATE1*income;
	}
	else 
	{
	  tax1=RATE1*RATE_MDRRIED_LIMIT;
	  tax2=RATE2*(income - RATE_MDRRIED_LIMIT);
	}
  }
 double totalTax = tax1 + tax2;
 System.out.println(totalTax);
 }
 }